<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改统计采购报')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-statisticsBuy-edit" th:object="${statisticsBuy}">
            <input name="statisticsBuyId" th:field="*{statisticsBuyId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">合同id：</label>
                <div class="col-sm-8">
                    <textarea name="contractId" class="form-control">[[*{contractId}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">月份：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="dateMonth" th:value="${#dates.format(statisticsBuy.dateMonth, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">采购金额：</label>
                <div class="col-sm-8">
                    <input name="buyTotalMoney" th:field="*{buyTotalMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">入库金额：</label>
                <div class="col-sm-8">
                    <input name="mallStoreTotalMoney" th:field="*{mallStoreTotalMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">对账金额：</label>
                <div class="col-sm-8">
                    <input name="accountTotalMoney" th:field="*{accountTotalMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付金额：</label>
                <div class="col-sm-8">
                    <input name="payTotalMoney" th:field="*{payTotalMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="*{remark}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "statistics/statisticsBuy";
        $("#form-statisticsBuy-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-statisticsBuy-edit').serialize());
            }
        }

        $("input[name='dateMonth']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>